package com.yuanian.ecsplus.platform;

import com.yuanian.businessobject.model.vo.base.BOSaveOrUpdateParam;
import com.yuanian.businessobject.model.vo.bodefine.BODefineSetupVO;

import java.util.List;
import java.util.Map;

/**
 * 平台的数据支撑接口
 */
public interface PlatformSupport {

    Map selectBoDataByBoMainId(String apiName, String apiVersionNumber, String boMainId);

    Map selectBoDataByBoDataId(String apiName, String apiVersionNumber, String boDataId);

    List<Map> selectBoDataList(String apiName, String apiVersionNumber, String sql);

    List<Map> selectBoDataList(String apiName, String apiVersionNumber, String sql, int limit, int offset, boolean totalResults, String orderBy);

    Map insertBoData(String apiName, String apiVersionNumber, Map boData);

    Map issueBoData(String apiName, String apiVersionNumber, Map boData);

    Map updateBoData(String apiName, String apiVersionNumber, String boMainId, Map boData);

    int deleteByBoMainId(String apiName, String apiVersionNumber, String boMainId);

    Map createBoData(String apiName, Map initData);

    void boMapFullDataConvert(Map boData,String apiName);

    Integer batchInsertBoData(String apiName, String apiVersionNumber, List<Map> dataList);

    Integer batchUpdateBoDataById(String apiName, String apiVersionNumber, List<Map> dataList);

    Integer batchDeleteBoDataById(String apiName, String apiVersionNumber, List<String> idList);

    void batchdeleteFile(List<String> ids);

    void saveOrUpdate(String apiName, String apiVersionNumber, List<Map> dataList, Map logicalKey, BOSaveOrUpdateParam saveOrUpdateParam);

    BODefineSetupVO getSetup(String apiName);

}
